-
Notifications
You must be signed in to change notification settings - Fork 7.9k
RFC: Deprecate type juggling to and from bool for function type juggling context #18879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Found while working on php/php-src#18879
0e1de90
to
abacde3
Compare
- Use INI sections - Use CGI sections - Move data into a subfolder - Remove ZPP tests - Fix various bugs within tests - Simplify some Found while working on #18879
abacde3
to
8f5f75b
Compare
Need to update ext/phar/tests/file/nophar.phar somehow to remove the deprecation...
8f5f75b
to
6487506
Compare
Thanks for the PR. I tried it on Symfony and I get tons of deprecations, of course. I'm already wondering if we shouldn't discuss about both directions of the conversion separately. It looks more of a smell to accept a bool where eg a string is expected, than to accept a string where a bool it required. This maps to structs like Places I found where the direction is from-bool are way less legit at first glance. Can you try running the test suite? Here is the doc about how to: https://symfony.com/doc/current/contributing/code/tests.html Then look at random deprecations and try to fix some to get some taste of the deprecation :) |
While I agree that coercing from bool to something else seem to always indicate a bug from doing fixes to the php-src tests, I have found a bunch of bugs in our test suite where strings are coerced to bool. And the engine/type system simplification of
This is not exactly true, as values of type
I'll have a look at them soon-ish and will ask for help if I can't run the test suite. |
RFC: https://wiki.php.net/rfc/deprecate-function-bool-type-juggling
@nicolas-grekas this should allow you to check if SF is affected :)